package com.zhuangjie.shop.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 商家账号
 * </p>
 *
 * @author zhuangjie
 * @since 2023-09-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("merchant_account")
@ApiModel(value="MerchantAccount对象", description="商家账号")
@Builder
public class MerchantAccount implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "编写")
      @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "商家/商店_店铺id")
    @TableField("shop_id")
    private Long shopId;

    @ApiModelProperty(value = "用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "姓别（0女1男）")
    @TableField("sex")
    private Integer sex;

    @ApiModelProperty(value = "状态(1正常 0锁定)")
    @TableField("status")
    private Short status;

    @ApiModelProperty(value = "是否为商家管理员账号")
    @TableField("is_admin")
    private Integer isAdmin;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "最后修改时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    @ApiModelProperty(value = "逻辑删除")
    @TableField(value = "deleted",fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleted;
}
